using System;
using System.Collections.Generic;
using System.Text;
using TaugeLibrary.Classes.Attributes;
using TaugeLibrary.Enums;
using TaugeLibrary.Interfaces;


namespace TaugeFramework.BusinessUnit.User
{
    [AttTable("UserAccount","UA") ]
    [AttPrimaryKey("UserId")]
    [AttUniqueKey("UserName")]
    [AttBindUI("TaugeFramework.BusinessUnit.User.UserUI")]
    class User:IBusinessUnit
    {
        

        private int m_user_id=0;
        [AttField("UserId",eDBDataType.IDENTITY,0)]
        [AttBindControl(eControlType.PROPERTY,"UserId")]
        public int UserId { set { m_user_id = value; } get { return m_user_id; } }

        private string m_user_name = "";
        [AttField("UserName", eDBDataType.VARCHAR, 50)]
        [AttBindControl(eControlType.TEXTBOX , "txtUsername")]
        public string UserName { get { return m_user_name; } set { m_user_name = value; } }

        private string m_password = "";
        [AttBindControl(eControlType.TEXTBOX, "txtPassword")]
        public string Password { get { return m_password; } set { m_password = value; } }
        [AttField("Password", eDBDataType.VARCHAR, 250)]
        public string PasswordHashed { get { return m_password; } set { m_password = value; } }


        private string m_description = "";
        [AttField("Description", eDBDataType.VARCHAR, 250)]
        [AttBindControl(eControlType.TEXTBOX, "txtDescription")]
        public string Description { get { return m_description; } set { m_description= value; } }

        private eUserType m_user_type = eUserType.USER;
        [AttField("UserType", eDBDataType.INT, 0)]
        [AttBindControl(eControlType.COMBOBOX, "cboUserType")]
        public eUserType UserType { get { return m_user_type; } set { m_user_type= value; } }

        private bool m_is_active = true;
        [AttField("IsActive", eDBDataType.BIT, 0)]
        [AttBindControl(eControlType.CHECKBOX, "chkIsActive")]
        public bool IsActive { get { return m_is_active; } set { m_is_active = value; } }


    }
}
